package com.qys.livesMall.finance.mapper;

import com.qys.livesMall.finance.model.dto.AccountSearch;
import com.qys.livesMall.finance.model.entity.user.FinanceUserAccount;
import com.qys.livesMall.framework.mapper.QysBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;


/**
 * <p>
 * 用户余额表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2023-06-06
 */
@Mapper
public interface FinanceUserAccountMapper extends QysBaseMapper<FinanceUserAccount, AccountSearch> {

    BigDecimal getTotalBalance(Integer userSysType);

    List<String> getSufficientAmountUser(@Param("amount") BigDecimal amount);

    BigDecimal getSumUserByteam(Long teamId);


    BigDecimal maxBalanceByUserIds(@Param("userIds")List<Long> userIds);
}
